﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sucdri.Domain.Model;

namespace Sucdri.Domain.Interface
{
   public interface IRepository<T>:IDisposable
   {
      //todo: implement UnitOfWork Patten
//      bool IsInTransaction { get; }
//      void BeginTransaction();
//      void Commit();
//      void RollBack();

      void Create(DomainEntity entity);
      void Update(DomainEntity entity);
      void Delete(DomainEntity entity);

      IList<T> GetAll();
      IList<T> GetAll(int index, int size);
      int GetCount();
      T GetById(int id);

      //todo:Implement Query Object
      //IList<T> GetByCriteria(Query query);
      //string TranslateQuery(Query query);
   }
}
